import { createApp } from 'vue'
import App from './App.vue'
import router from '@/routers/index'//引入路由
import Vant from './plugins'// vant组件库按需引入集中管理
import 'vant/lib/index.css';//引入vant组件库样式
import { Lazyload } from 'vant';//懒加载
import img from '@/assets/loading.gif'//懒加载图片
import { createPinia } from 'pinia';//引入pinia
import piniaPluginPersist from 'pinia-plugin-persist'//引入pinia持久化存储插件

const pinia = createPinia()//创建pinia实例
pinia.use(piniaPluginPersist)//使用pinia持久化存储插件

const app = createApp(App)
// getVant(app)//传app进去
app.use(Vant)
// 注册时可以配置额外的选项
app.use(Lazyload, {
    loading:img
  });
app.use(pinia)
app.use(router)
app.mount('#app')
